#include"process.h"

void DownLoad(double size, double split)
{
  double cur = 0.0;
  while(cur <= size)
  {
    FlushProcess(size,cur);
    if(cur >= size)
    {
      break;
    }
    usleep(1000);
    cur += split;
  }
}

int main()
{
  //process();
  printf("下载中:\n");
  DownLoad(1024.0, 4.0);
  printf("下载中:\n");
  DownLoad(512.0, 2.0);
  printf("下载中:\n");
  DownLoad(10240.0,8.0);
  printf("下载中:\n");
  DownLoad(5120.0,4.0);
  return 0;
}
